<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <!-- basic styles -->
        <link href="../../assets/js/plugin/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
        <link type="text/css" rel="stylesheet" href="../../assets/js/plugin/jquery-ui/css/jquery-ui.css" />
        <link href="../../assets/js/plugin/datepicker/css/jquery-datepicker.css" rel="stylesheet" media="screen" />
        <!--<link href="../../assets/js/plugin/check/check.css" rel="stylesheet" media="screen" />-->
        <link rel="stylesheet" href="../../assets/css/ace.min.css" />
        <style>
            .controls span.help-inline{ font-size:12px; color:#999}
        </style>
    <body> 

        <div class="main-container">
            <h4 style="padding-left:20px; margin-top: 20px;" class='header smaller lighter blue'>用户/应用策略信息下发添加</h4>
            <form class="form-horizontal">  
                <div class="control-group">
                    <label class="control-label" for="policy_desc">策略名称:</label>
                    <div class="controls">
                        <input class="policy_desc" type="text" name="1" id="policy_desc" placeholder="" required>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="Bind_Action">绑定动作类型</label>
                    <div class="controls" >
                        <select id="Bind_Action" class="Bind_Action">
                            <option value="1">增加</option>
                            <option value="2">删除</option>
                        </select>
                        <!--<span class="help-inline">用户/应用策略绑定关系</span>-->
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="UserType">用户类型</label>
                    <div class="controls">
                        <select class="UserType" id="UserType"> 
                            <option value="0">针对所有用户的全局策略</option>
                            <option value="1">针对帐号用户</option>
                            <option value="2">针对静态 IP 地址用户</option>
                            <option value="3">针对组用户</option>
                        </select>
                    </div>
                </div> 
                <div class="control-group">
                    <label class="control-label" for="UserName">用户帐号(组名)</label>
                    <div class="controls">
                        <input id="UserName" class="UserName" name="2" type="text" required/>
                    </div>
                </div>
                <div class="add">

                </div>

                <div class="control-group">
                    <div class="controls">
                        <a href="javascript:void(0)" class="btn btn-success" onclick="addNode('0x01')">&nbsp;新&nbsp;增&nbsp;策&nbsp;略&nbsp;</a> 
                        <a href="javascript:void(0)" class="btn btn-primary" onclick="edit()">&nbsp;保&nbsp;存&nbsp;</a>
                        <a href="javascript:void(0)" class="btn btn-danger" onclick="previous()">&nbsp;取&nbsp;消&nbsp;</a>
                    </div>
                </div>
            </form>
        </div>
        <script src="../../assets/js/jquery.js"></script>
        <script src="../../assets/js/plugin/bootstrap/js/bootstrap.min.js"></script>
        <script src="../../assets/js/plugin/menu/menu.js"></script>
        <!--<script src="../../assets/js/logic/overlayer.js"></script>-->
        <script src="../../assets/js/jquery.validate.js"></script>
        <script src="../../assets/js/jquery.validate-util.js"></script>
        <script src="../../assets/js/Base64.js"></script>
        <script src="logic.js"></script>
        <script>
                            $(function () {
//                                console.log("type:" + type + "\tDepotID:" + DepotID + "\tDepotName:" + DepotName + "\tid:" + id);
                                $(".header").text(DepotName + "  策略管理");
                                $(".UserType").change(function () {
                                    var value = $(this).val();
                                    if (value == '0') {
                                        $(".UserName").val("");
                                        $(".UserName").attr("disabled", true);
                                    } else {
                                        $(".UserName").val("");
                                        $(".UserName").attr("disabled", false);
                                    }
                                });
                                //addNode("0x01");
                                showData();
                            });
        </script>
    </body>
</html>